using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Unit_LineCollider_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Unit.LineCollider);

            field = type.GetField("start", flag);
            app.RegisterCLRFieldGetter(field, get_start_0);
            app.RegisterCLRFieldSetter(field, set_start_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_start_0, AssignFromStack_start_0);
            field = type.GetField("end", flag);
            app.RegisterCLRFieldGetter(field, get_end_1);
            app.RegisterCLRFieldSetter(field, set_end_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_end_1, AssignFromStack_end_1);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Unit.LineCollider());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Unit.LineCollider[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_start_0(ref object o)
        {
            return ((huqiang.Unit.LineCollider)o).start;
        }

        static StackObject* CopyToStack_start_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Unit.LineCollider)o).start;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_start_0(ref object o, object v)
        {
            ((huqiang.Unit.LineCollider)o).start = (UnityEngine.Vector2)v;
        }

        static StackObject* AssignFromStack_start_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector2 @start = (UnityEngine.Vector2)typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            ((huqiang.Unit.LineCollider)o).start = @start;
            return ptr_of_this_method;
        }

        static object get_end_1(ref object o)
        {
            return ((huqiang.Unit.LineCollider)o).end;
        }

        static StackObject* CopyToStack_end_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Unit.LineCollider)o).end;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_end_1(ref object o, object v)
        {
            ((huqiang.Unit.LineCollider)o).end = (UnityEngine.Vector2)v;
        }

        static StackObject* AssignFromStack_end_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector2 @end = (UnityEngine.Vector2)typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            ((huqiang.Unit.LineCollider)o).end = @end;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Unit.LineCollider();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
